<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // Array.from(伪数组,函数);
        var arrayLike = {
            '0': '张三',
            '1': '李四',
            '2': '王五',
            'length': 3
        };
        var ary = Array.from(arrayLike);
        console.log(ary);

        var array = {
            '0': '1',
            '1': '2',
            '2': '3',
            'length': 3
        };
        var arr = Array.from(array, item => item * 2);
        console.log(arr);
    </script>
</body>

</html>